import React, { useEffect, useState } from 'react'
import { ResultPage, Card ,Button,Popup,IndexBar, List ,Tag} from 'antd-mobile'
import { LoopOutline } from 'antd-mobile-icons'
import dayjs from 'dayjs'
import axios from '../../api/axios'
import City from '../../components/City'
function Index() {
    let [start,setstart]=useState('北京')
    let [end,setend] =useState('三亚')
    let [date,setDate]=useState(dayjs().format('YYYY-MM-DD'))
     const [visible1, setVisible1] = useState(false)
     
  return (
    <div>
     <ResultPage
      status=''
      title='操作成功'
      description='内容详情可折行，建议不超过两行建议不超过两行建议不超过两行'
    >
      <Card style={{ marginTop: 12 }}>
        <div style={{display:'flex',}}>
            <span style={{margin:'0 80px'}} onClick={()=>setVisible1(true)}>{start}</span>
            <LoopOutline fontSize={24} />
            <span style={{margin:'0 80px'}} onClick={()=>setVisible1(true)}>{end}</span>
        </div>
        <div style={{margin:'10px 80px'}}>
            {date}
        </div>
        <Button block color='primary' size='large'>
         查询机票
        </Button>
      </Card>
    </ResultPage>
    <Popup
              visible={visible1}
              onMaskClick={() => {
                setVisible1(false)
              }}
              onClose={() => {
                setVisible1(false)
              }}
           bodyStyle={{ height: '90vh' }}
            >
                <City></City>
            
            </Popup>

    </div>
  )
}

export default Index
